from openpyxl.workbook import Workbook
wb=Workbook()
ws=wb.worksheets[0]
ws.title="合并单元格"
c1=ws.cell(2,2)
c1.value="我不是刘朝朋"
c2=ws.cell(3,3)
c2.value="我是朱振凯"
# ws.merge_cells("D1:F10")
ws.merge_cells(start_row=2,start_column=2,end_row=10,end_column=10)
wb.save("files/合并单元格.xlsx")